You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(gateway): keep a day of gateway logs on the box - #1506
The gateway's Docker log keeps 72 files of 100 MB instead of 2, and compresses the rotated ones.
With 2 files the mainnet gateway kept 30 to 60 minutes of logs, so nothing was left by the time a report about the day before came in.
Sizing
Measured on the mainnet gateway on 26 Nov 2026: one 100 MB file covered 06:48:15 to 07:18:29 UTC, about 200 MB an hour, and gzip shrinks a full file to 4.8 MB. 72 files hold about 30 hours at that rate in about 0.5 GB of disk. The testnet gateway writes about a quarter of that.
Applying it
A running container keeps its log options until it is recreated, so each gateway box needs the same logging block in its own gateway-compose.yaml, then docker compose up -d for kwil-gateway. Recreating the container drops its current logs and signs clients out, the same as a restart.
The logger now retains up to 72 files and compresses rotated files. The comments describe estimated retention and disk usage. The 100m per-file limit is unchanged.
Goal: apps read TN mainnet without stalls #1500: Longer gateway log retention can help diagnose past slow reads, but this change does not implement logging that identifies which call was slow.
Suggested reviewers:outerlook
Merge Risk: Minimal · up to a20b1
This raises gateway log retention to about 30 hours on mainnet, using roughly 0.5 GB of disk. Applying it requires recreating the gateway container, which briefly signs clients out as a restart does. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: gateway log retention is raised so that about a day of logs stays on the host. The changeset raises the kwil-gateway JSON-file retention from 2 to 72 rotated files and…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: gateway log retention is raised so that about a day of logs stays on the host. The changeset raises the kwil-gateway JSON-file retention from 2 to 72 rotated files and enables compression, which matches the objective of keeping roughly 30 hours of logs. The 'chore(gateway):' prefix is a conventional type and scope, and the wording is specific enough for a teammate to scan history.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 9544707d-976b-4355-a207-75f51dc2f33e
Commits
Reviewing files that changed from the base of the PR and between f938345 and a20b15f.
Files selected for processing: 1
deployments/gateway/gateway-compose.yaml
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sizing
Measured on the mainnet gateway on 26 Nov 2026: one 100 MB file covered 06:48:15 to 07:18:29 UTC, about 200 MB an hour, and gzip shrinks a full file to 4.8 MB. 72 files hold about 30 hours at that rate in about 0.5 GB of disk. The testnet gateway writes about a quarter of that.
Applying it
A running container keeps its log options until it is recreated, so each gateway box needs the same
loggingblock in its owngateway-compose.yaml, thendocker compose up -dforkwil-gateway. Recreating the container drops its current logs and signs clients out, the same as a restart.Related:
Summary by CodeRabbit